UNPKG

marko

Version:

UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.

20 lines (17 loc) 706 B
"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.default = _default;var _compiler = require("@marko/compiler"); var _he = require("he"); var _vdomOutWrite = _interopRequireDefault(require("../util/vdom-out-write")); var _withPreviousLocation = _interopRequireDefault(require("../util/with-previous-location")); function _default(path) { const { node } = path; path.replaceWith( (0, _withPreviousLocation.default)( (0, _vdomOutWrite.default)( "t", _compiler.types.stringLiteral((0, _he.decode)(node.value)), path.hub.file._componentInstanceIdentifier ), node ) ); }